import request from '../utils/requestes'



//定义请求的地址
enum API {
    //浏览记录接口
    HISTORY = '/moment/viewRecords?access_token=44a1774d-d100-4466-a563-d53568921920&pageSize=10&pageNum=0&subject=%E6%B5%8F%E8%A7%88%E8%AE%B0%E5%BD%95',
    //练习室
    PRACTICE = '/trainingCenter/plans/search/findByUserId?access_token=44a1774d-d100-4466-a563-d53568921920&pageSize=20&pageNum=0&type=system',
    //搜索框接口
    SEARCH = '/moment/viewRecords?access_token=44a1774d-d100-4466-a563-d53568921920&pageSize=10&pageNum=0',
    //历史删除确定按钮接口
    DELETE = '/moment/viewRecords?access_token=44a1774d-d100-4466-a563-d53568921920&pageSize=10&pageNum=0&subject=%E6%B5%8F%E8%A7%88%E8%AE%B0%E5%BD%95',
    // 收藏接口collect
    COLLECT = '/moment/favoriteRecords/search/findByUserId?access_token=44a1774d-d100-4466-a563-d53568921920&pageSize=10&subject=activity',
    // 缓存接口
    HUANCUN='/userCenter/userVideoCacheSyncs/collect/findByType?access_token=44a1774d-d100-4466-a563-d53568921920&pageSize=10&type=video'

}
//浏览记录
export const getHistoryListApi = () => request.get(API.HISTORY)
//获取练习室数据
export const getPracticeApi = (myListCategory?: string) => request.get(API.PRACTICE, { params: { myListCategory } })
// 获取历史浏览搜索框
export const getHistorySearchApi = (keyword: string) => request.get(API.SEARCH, { params: { keyword } })
// 获取历史删除确定按钮id
export const getDeleteApi = (id: any) => request.get(API.DELETE, id)
// 获取收藏数据
export const getCollectApi = ()=>request.get(API.COLLECT) 
//获取缓存数据
export const getHuanCunApi = ()=>request.get(API.HUANCUN)




